package com.heima.user.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AdAuthDto;
import com.heima.user.service.AdUserAuthService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: AdUserAuthController
 * Description:
 * date: 2023/8/22 0022 18:36
 *
 * @author zHan
 */
@RestController
@Slf4j
@RequestMapping("/api/v1/auth")
@Api(tags = "管理员端用户审核相关接口")
public class AdUserAuthController {

    @Autowired
    private AdUserAuthService adUserAuthService;

    /**
     * 查询认证列表
     * @return
     */
    @PostMapping("/list")
    @ApiOperation("查询认证列表")
    public ResponseResult list(@RequestBody AdAuthDto dto) {
        return adUserAuthService.list(dto);
    }

    /**
     * 用户审核成功
     * @return
     */
    @PostMapping("/authPass")
    @ApiOperation("用户审核成功")
    public ResponseResult authPass(@RequestBody AdAuthDto dto) {
        return adUserAuthService.authPass(dto);
    }

    /**
     * 用户审核成功
     * @return
     */
    @PostMapping("/authFail")
    @ApiOperation("用户审核失败")
    public ResponseResult authFail(@RequestBody AdAuthDto dto) {
        return adUserAuthService.authFail(dto);
    }
}
